package Jicheng01;

/**
 * 电饭煲
 */
public class RiceCooker {
    private String ordinary; //普通的


    public RiceCooker(){                   //空的构造方法
    }
    public RiceCooker(String ordinary){   //构造方法】
        this.ordinary=ordinary;
    }

    public void ihtro(){
        System.out.println("有一个"+ordinary);
    }

    public String getOrdinary(){      //访问值
        return ordinary;
    }
    public void setOrdinary(String ordinary){  // //修改值
        this.ordinary=ordinary;
    }

    public static void main(String[]args){
        RiceCooker riceCooker=new RiceCooker();   //父类
        riceCooker.setOrdinary("普通的电饭煲");     //修改
        riceCooker.ihtro();                     //输出





    }



}
